-
-
Notifications
You must be signed in to change notification settings - Fork 32
feat: added a dynamic header for dragbar #1223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
65e7930 to
f84c114
Compare
| // Respect fullscreen state - hide drag bar if in fullscreen mode | ||
| if (window.__ELECTRON_IS_FULLSCREEN__) { | ||
| dragBar.style.display = 'none'; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fullscreen state lost on page reload
When the page reloads while in fullscreen mode, the window.__ELECTRON_IS_FULLSCREEN__ variable is lost since it's stored on the window object which is recreated. The did-finish-load handler creates the drag bar without checking current fullscreen state, and useElectronFullscreen initializes to false since the variable is undefined. The enter-full-screen event won't re-fire because the window is already fullscreen. This results in the UI showing non-fullscreen state (visible spacer and drag bar) until the user exits and re-enters fullscreen. The main process could inject the current state by calling win.isFullScreen() in the did-finish-load handler.
Additional Locations (1)
BYK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the refactoring and the look (based on the videos you shared, have not tested locally)
BYK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much nicer!
No description provided.